package net.area80.fbx
{
	import net.area80.fbx.data.FBXData;
	import net.area80.fbx.data.FBXFileInfo;
	import net.area80.utils.SmartLoader;
	
	import org.osflash.signals.Signal;
	
	public class FBXImporter
	{
		public var SIGNAL_LOADCOMPLETE:Signal = new Signal(FBXData);
		private var rawXML:XML;
		public var fbxData:FBXData;
		public function FBXImporter()
		{
		}
		public function load (path:String):void {
			var sm:SmartLoader = new SmartLoader();
			sm.load(path,"xml");
			sm.SIGNAL_COMPLETE.add(onLoadComplete);
		}
		private function onLoadComplete (d:*):void {
			var xml:XML = XML(d);
			//trace(xml);
			fbxData = FBXData.createFromXML(xml);
			SIGNAL_LOADCOMPLETE.dispatch(fbxData);
			
		}

	}
}